package com.agriculture.competition.service.impl;

import java.util.List;
import com.agriculture.common.core.utils.DateUtils;
import com.agriculture.competition.domain.JaCompetitionScore;
import com.agriculture.competition.mapper.JaCompetitionScoreMapper;
import com.agriculture.competition.service.IJaCompetitionScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 比赛分数Service业务层处理
 * 
 * @author agriculture
 * @date 2024-11-12
 */
@Service
public class JaCompetitionScoreServiceImpl implements IJaCompetitionScoreService
{
    @Autowired
    private JaCompetitionScoreMapper jaCompetitionScoreMapper;

    /**
     * 查询比赛分数
     * 
     * @param id 比赛分数主键
     * @return 比赛分数
     */
    @Override
    public JaCompetitionScore selectJaCompetitionScoreById(Long id)
    {
        return jaCompetitionScoreMapper.selectJaCompetitionScoreById(id);
    }

    /**
     * 查询比赛分数列表
     * 
     * @param jaCompetitionScore 比赛分数
     * @return 比赛分数
     */
    @Override
    public List<JaCompetitionScore> selectJaCompetitionScoreList(JaCompetitionScore jaCompetitionScore)
    {
        return jaCompetitionScoreMapper.selectJaCompetitionScoreList(jaCompetitionScore);
    }

    /**
     * 新增比赛分数
     * 
     * @param jaCompetitionScore 比赛分数
     * @return 结果
     */
    @Override
    public int insertJaCompetitionScore(JaCompetitionScore jaCompetitionScore)
    {
        jaCompetitionScore.setCreateTime(DateUtils.getNowDate());
        return jaCompetitionScoreMapper.insertJaCompetitionScore(jaCompetitionScore);
    }

    /**
     * 修改比赛分数
     * 
     * @param jaCompetitionScore 比赛分数
     * @return 结果
     */
    @Override
    public int updateJaCompetitionScore(JaCompetitionScore jaCompetitionScore)
    {
        jaCompetitionScore.setUpdateTime(DateUtils.getNowDate());
        return jaCompetitionScoreMapper.updateJaCompetitionScore(jaCompetitionScore);
    }

    /**
     * 批量删除比赛分数
     * 
     * @param ids 需要删除的比赛分数主键
     * @return 结果
     */
    @Override
    public int deleteJaCompetitionScoreByIds(Long[] ids)
    {
        return jaCompetitionScoreMapper.deleteJaCompetitionScoreByIds(ids);
    }

    /**
     * 删除比赛分数信息
     * 
     * @param id 比赛分数主键
     * @return 结果
     */
    @Override
    public int deleteJaCompetitionScoreById(Long id)
    {
        return jaCompetitionScoreMapper.deleteJaCompetitionScoreById(id);
    }
}
